﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Portfolio.UI.Common
{
    /// <summary>
    /// My class all session
    /// </summary>
    public class MySession
    { 
        /// <summary>
        /// private constructor
        /// </summary>
        private MySession() {}
        
        /// <summary>
        /// Gets the current session.    
        /// </summary>
        public static MySession Current    
        {      
            get
            {        
                MySession session = (MySession)HttpContext.Current.Session["__MySession__"];        
                if (session == null)        
                {          
                    session = new MySession();
                    HttpContext.Current.Session["__MySession__"] = session;        
                }        
                return session;      
            }
        }    
        
        /// <summary>
        /// **** add your session properties here, e.g like this:
        /// </summary>
        public string MessageError { get; set; }
        public string InformationSuccess { get; set; }
        public string InformationNotice { get; set; }
    }    
}